export const mappingMixins = {
  data () {
    return {
      statusList: [
        { id: 'calibrating', name: '进行中', type: 'primary' },
        { id: 'completed', name: '已完成', type: 'success' }
      ],
      priorityList: [
        { id: 'high', name: '紧急' },
        { id: 'normal', name: '正常' },
      ],
      typeList: [
        { id: 'txt_classify', name: '文本分类' },
        { id: 'img_classify', name: '图像分类' },
        { id: 'voice_classify', name: '语音分类' },
        { id: 'img_detection', name: '物体检测' },
      ]
    }
  }
};

export const modalMixins = {
  data () {
    return {
      flag: false,
      showClose: false,
      modalFlag: false,
      title: '',
      assembly: '',
    }
  },
  methods: {
    close () {
      this.flag = false;
    }
  }
};

export const detailMixins = {
  computed: {
    id () {
      return this.$route.query.id || '';
    },
    finisher () {
      return this.$route.query.finisher || '';
    },
    calibrationId () {
      return this.$route.query.calibrationId || '';
    }
  },
  methods: {
    goBack () {
      window.history.go(-1);
    }
  }
};
